package com.wn.pettyloan.controller;

import com.wn.pettyloan.entity.DocumnetType;
import com.wn.pettyloan.service.DocumentTypeService;
import com.wn.pettyloan.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ：Morsera
 * @date ：Created in 2022/12/12 15:02
 * @description：
 */

@RestController
@RequestMapping("documentTypes")
public class DocumentTypeController {
    @Resource
    private DocumentTypeService documentTypeService;

    @GetMapping()
    public Result selAll(){
        List<DocumnetType> list = documentTypeService.selAll();
        return Result.ok().data("documentTypeList",list);
    }
}
